﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using Htss.Platform.Web;

namespace DreamBox.Web.Box.user
{
    public class infoBox:ControllerBox
    {
        public ActionResult Load()
        {
            DAL.PSelect ps = new DAL.PSelect();
            DataTable dt = ps.Select("dbox_v_userinfo", "UserID,UserName,Email,Tags,Sex,Signature,RegisterDate,LastLoginDate,Location,GroupName", "UserID=" + Session["UserID"]);
            if (dt.Rows.Count > 0)
            {
                ViewData["UserID"] = dt.Rows[0]["UserID"];
                ViewData["UserName"] = dt.Rows[0]["UserName"];
                ViewData["Tags"] = dt.Rows[0]["Tags"];
                ViewData["Sex"] = dt.Rows[0]["Sex"];
                ViewData["Signature"] = dt.Rows[0]["Signature"];
                ViewData["Location"] = dt.Rows[0]["Location"];
                ViewData["Email"] = dt.Rows[0]["Email"];
                ViewData["RegisterDate"] = dt.Rows[0]["RegisterDate"];
                ViewData["LastLoginDate"] = dt.Rows[0]["LastLoginDate"];
                ViewData["GroupName"] = dt.Rows[0]["GroupName"];
            }
            return View("user_info");
        }
    }
}
